﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Maticsoft.Web.stu
{
    public partial class login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btn_login_Click(object sender, EventArgs e)
        {
            string pass = this.txt_pass.Text;
            string name = this.txt_name.Text;

            List<Maticsoft.Model.studentInfo> lu = new Maticsoft.BLL.studentInfo().GetModelList(" and stuname='" + name + "' and stunum ='" + pass + "' ");

            if (lu.Count > 0)
            {
                Session["login"] = lu[0];
                Response.Redirect("Frame.aspx");
            }
            else
            {
                Maticsoft.Common.MessageBox.Show(this.Page, "用户名密码不对！");
            }
        }
    }
}